package com.cdd.user.controller;

import com.cdd.user.service.UserRoleService;
import com.common.untils.CommonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 *
 *
 * @author lenovo
 * @version 1.0
 * @since 2022-09-06  14:48:51
 */
@RestController
@RequestMapping("/user/user")
public class UserRoleController {
    @Autowired
    private UserRoleService userRoleService;
    //根据用户id添加角色
    @PostMapping("/fenUserRole/{userId}")
    public CommonResult fenUserRole(@PathVariable String userId,@RequestBody List<String> idlist){
        return userRoleService.fenUserRole(userId,idlist);
    }
}
